// 依赖导入
import Vue from 'vue';
import VueRouter from 'vue-router';
import Router from 'vue-router';
Vue.use(Router);
//组件引入
import Index from '../views/index.vue';
import DoctorInfo from '../views/doctorInfo.vue';

const routes = [
    // {
    //     path:'/',
    //     name: 'index',
    //     component: () => import('../views/index.vue'),
    //     redirect: '/index'
    // },
    {
        path:'',
        name: 'index',
        component: Index,
    },
    {
        path:'/doctorInfo',
        name: 'doctorInfo',
        component: DoctorInfo,
        // component: () => import('../views/doctorInfo.vue'),
    },
]

var router = new VueRouter({
    mode: 'history',
    routes:routes
})

export default router